<template>
  <div>
    用户名：<input type="text" v-model="user.username" /> 密码：<input
      type="text"
      v-model="user.password"
    />
    <button @click="login">提交</button>
  </div>
</template>

<script>
import {loginURL} from '../../apis/01axios请求逻辑的封装'
export default {
data(){
    return {
        user:{
            username:'',
            password:''
    }

    }

},
methods:{
    login(){
        loginURL(this.user).then(res=>console.log(res)).catch(err=>console.log(err))
    }
}
}
</script>
<style lang='less' scoped>
</style>
